package com.yanqu.road.server.cmd.activity.bulletscreen;

import com.yanqu.road.pb.activity.BulletScreenProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.bulletscreen.BulletScreenModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_ACTIVITY_LIST_BULLET_SCREEN_COMMENTS, desc = "弹幕列表")
public class BulletScreenContentListCmd extends AbstractCommand {


    int activityId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        BulletScreenProto.BulletScreenContentListReqMsg reqMsg = BulletScreenProto.BulletScreenContentListReqMsg.parseFrom(packet.getBytes());
        activityId = reqMsg.getActivityId();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
      ret = player.getModule(BulletScreenModule.class).getBulletScreenMsgList(activityId);

    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
